<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>class属性绑定</title>
    <script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>
    <style>
        .srcClass{
            width: 100%;
        }
    </style>
</head>
<body>
<div id="case6-demo1">
    <img src="../../images/timg2.jpg" v-bind:class="{srcClass:srcFlag}">
</div>
<script type="text/javascript">
    var case6Demo=new Vue({
        el:"#case6-demo1",
        data:{
            srcFlag:true
        }
    })
</script>
</body>
</html>